package com.example.demo;

import com.actionbarsherlock.app.SherlockFragment;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.View.OnClickListener;
import android.widget.Button;

public class FirstFragment extends SherlockFragment   {

	
	  
	    
	    
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View view = inflater.inflate(R.layout.fragment_first, container, false);
		Button bt_first = (Button) view.findViewById(R.id.bt_first);
		bt_first.setOnClickListener(new OnClickListener() {

			public void onClick(View v) {

				FragmentTransaction ft = getFragmentManager()
						.beginTransaction();
				ft.setCustomAnimations(R.animator.slide_in_left, R.animator.slide_out_right);
				SecondFragment second = new SecondFragment();
				ft.replace(R.id.container, second);
				ft.commit();
			}
		});
		
		return view;
	}

    
  

	
}
